Repository navigation
fix(Popover): the touch growth shows its content from its first frame - #10757
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| lab/CommentComposer | 151.6 kB (+23 B) · 1.9 kB CSS (0) | — | — · — · — |
| lab/ChatReactionBar | 107.1 kB (+20 B) · 1.1 kB CSS (0) | — | — · — · — |
| lab/ChatEmojiPicker | 106.0 kB (+19 B) · 773 B CSS (0) | — | — · — · — |
4 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| Popover · Storybook | 91.1 kB (+18 B) · 14.2 kB CSS (0) | 1,540 (+9) | ✓ · ✓ · ✓ |
| lab/Comments | 350.8 kB (+17 B) · 2.5 kB CSS (0) | — | — · — · — |
| lab/TourStep | 97.4 kB (+13 B) · 590 B CSS (0) | — | — · — · — |
| lab/CommentThread | 343.9 kB (+11 B) · 2.4 kB CSS (0) | — | — · — · — |
Package size: @astryxdesign/core 7.20 MB packed (+824 B); no new dependencies.
API changes: none in this pull request
Committed API report behind this build: cli 29 rows, core 34 rows, theme-butter 1 row, theme-y2k 1 row; run pnpm api:report.
Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
The fix is small and well proven: the new first-frames proof fails on main and passes here, and the Reduce Motion, exit and mouse paths are unchanged.
Approval waits on one spec decision, because the pull request adds a requirement to a current record:
component:PopoverPR5 and its verification row need an engineering owner to approve them by commenting/approve-spec <full head SHA>(the author is an engineering owner and may do so), or to ask for different wording, such as stating only the outcome and leaving 0.001 to code.
No code change is required, and the inline notes are optional comment tidy-ups; CI has not run yet because this is a draft from a fork, so it needs to leave draft and get a maintainer's ci:run label.
[Automated review]
Chromium skips drawing a layer at exactly opacity 0 as its animation starts. Under a finger, Popover's growth faded in from 0, so Chromium rasterized the popover again once the fade made it visible, and the first frames showed it without its content. The growth now fades in from opacity 0.001, a quarter of one step of an 8-bit channel: Chromium draws its first frame, and no pixel changes. The floor is defined once, in motion/opacityFloor.ts, for compositor entrances that fade in from transparent. The start values keep opacity 0, so Reduce Motion, which replaces the growth with a cross-fade, still fades in from transparent. A new proof reads the compositor's record of each frame it presents: the growth shows its content from its first frames, also with a tap outside while it grows. component:Popover records the floor as PR5.
dc660a6 to
6eaac92
Compare
|
/approve-spec 6eaac92 |
There was a problem hiding this comment.
Approved pending CI. The touch growth's opacity floor is small and well proven, and the new component:Popover PR5 is approved for this head.
- The new first-frames proof fails on
mainand passes here; the Reduce Motion, shrink and mouse paths are unchanged. - CI has not run on this head yet, because the pull request is still a draft and a draft runs no CI. It already carries
ci:run, so marking it ready for review starts CI.
The earlier comment suggestions are all applied.
[Automated review]
User impact
In Chromium on a touch screen, a Popover opened by a finger shows one to three frames without its content, on almost every opening. With this change the growth shows its content from its first frame, and no pixel differs.
Problem and solution fit
The growth's opacity started at exactly 0. Chromium skips drawing a layer at exactly 0 as its animation starts, and rasterizes it once the fade makes it visible. So the first visible frame is late and can lack the content. A UIKit popover shows its content from its first frame. The growth now fades in from 0.001, a quarter of one 8-bit step: Chromium draws the first frame, and no pixel changes.
Expected behavior and authority
component:PopoverFR9 (spec:AST-094FR31) defines the growth, and no current record says it starts at alpha 0. Newcomponent:PopoverPR5 states the expected behavior.Smallest restoration
motion/opacityFloor.ts(new, internal):ENTRANCE_OPACITY_FLOOR = 0.001, with its reason. The motion README lists it.popoverSurfaceMotion.ts: the growth's opacity curve does not go below the floor. The start values keep opacity 0, so under Reduce Motion the cross-fade still fades in from transparent. The exit is unchanged.This touches the same import lines of
popoverSurfaceMotion.tsas #9769. Whichever lands second resolves the conflict; this pull request rebases if theirs lands first.Evidence
Full numbers and method: evidence.
PipelineReporter).Scope
Testing
Writing rubric results